using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication11.Models.Mapping
{
    public class intervention_historyMap : EntityTypeConfiguration<intervention_history>
    {
        public intervention_historyMap()
        {
            // Primary Key
            this.HasKey(t => t.intervention_history_id);

            // Properties
            this.Property(t => t.patient_id)
                .IsRequired()
                .HasMaxLength(20);

            this.Property(t => t.create_user_id)
                .HasMaxLength(100);

            this.Property(t => t.update_user_id)
                .HasMaxLength(100);

            // Table & Column Mappings
            this.ToTable("intervention_history");
            this.Property(t => t.intervention_history_id).HasColumnName("intervention_history_id");
            this.Property(t => t.follow_up_id).HasColumnName("follow_up_id");
            this.Property(t => t.patient_id).HasColumnName("patient_id");
            this.Property(t => t.create_time).HasColumnName("create_time");
            this.Property(t => t.create_user_id).HasColumnName("create_user_id");
            this.Property(t => t.update_time).HasColumnName("update_time");
            this.Property(t => t.update_user_id).HasColumnName("update_user_id");
        }
    }
}
